package com.ruoyi.asset.recycle.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.asset.recycle.domain.WasteRecycle;
import com.ruoyi.asset.recycle.domain.bo.*;
import com.ruoyi.asset.recycle.domain.vo.WasteRecycleVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 *  垃圾收运
 * @author 12276
 */
public interface WasteRecycleMapper extends BaseMapperPlus<WasteRecycleMapper, WasteRecycle, WasteRecycleVo> {

    /**
     * 删除垃圾收运
     */
    int logicDeleteRecycle(@Param("idsSet") Set<Long> idsSet);

    /**
     *  分页查询垃圾收运管理范围
     */
    Page<WasteRecycleVo> selectRecyclePage(IPage<WasteRecycleVo> page, @Param("searchBo") WasteRecycleBo searchBo);

    /**
     * 查询垃圾收运管理范围
     */
    List<WasteRecycleVo> exportRecycle(@Param("searchBo") WasteRecycleBo searchBo);

    /**
     * 统计首页数据
     * @return
     */
    Integer selectNumCount();

    Double selectWeightSum();

    Integer selectCommunityPointCount(@Param("community") String community);

    List<RecycleTypeBo> selectCommunityTypeCount(@Param("community") String community);

    Integer selectRecycleNumByCommunity(@Param("date") String date, @Param("year")String year,
                                           @Param("community")String community);

    Double selectRecycleWeightByCommunity(@Param("date") String date, @Param("year")String year,
                                           @Param("community")String community);
}
